#!/bin/sh

CFLAGS="$CFLAGS \
     -I/usr/include/apr-1.0  \
     -I/usr/include/apr-1.0 -I/usr/include \
    -I/usr/include/apache2 \
    -I/usr/include/libxml2 \
    -DWITH_LUA -I/usr/include/lua5.1   \
    -DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500  -DREQUEST_EARLY          \
     \
    -DWITH_YAJL -I/usr/include/yajl  "


CORE_LIBS="$CORE_LIBS \
     -L/usr/lib -lapr-1 \
     -L/usr/lib -laprutil-1 \
    -I/usr/include/apache2 \
    -L/usr/lib/x86_64-linux-gnu -lcurl \
    -lxml2 \
    -llua5.1   \
    -lpcre \
    -L/usr/lib  -lcap \
    -lyajl  "

ngx_addon_name=ngx_http_modsecurity

CORE_MODULES="$CORE_MODULES ngx_pool_context_module"

HTTP_AUX_FILTER_MODULES="ngx_http_modsecurity $HTTP_AUX_FILTER_MODULES"

NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
		$ngx_addon_dir/ngx_http_modsecurity.c \
		$ngx_addon_dir/apr_bucket_nginx.c \
		$ngx_addon_dir/ngx_pool_context.c"

NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
		$ngx_addon_dir/apr_bucket_nginx.h \
		$ngx_addon_dir/ngx_pool_context.h"

CORE_LIBS="$ngx_addon_dir/../../standalone/.libs/standalone.a $CORE_LIBS"

CORE_INCS="$CORE_INCS \
	$ngx_addon_dir \
	$ngx_addon_dir/../../standalone \
	$ngx_addon_dir/../../apache2"

